    <div class="site_map" align="left">Trang chủ <img src="/onlinemarket/img/navbit-arrow-right.png"/>Nhà sản xuất</div>
    <div class="heading">
        <div class="heading_left"></div>
        <div class="heading_right"></div>
        <div class="heading_center">
        	<h3>Quản lý nhà sản xuất</h3>
        </div>

        <div class="table">
            <h1>&nbsp;</h1>
           <form  method="post" id="Provider" name="Provider" action="/onlinemarket/providers/save">
		    <table style="padding-left: 20px; padding-right: 125px;" class="noborder">
                
		   <input type="hidden" id="id" name="id" value="<?php echo($iProvider['Provider']['id']); ?>"/>
                 
                 <tr>
                 <td>Name: </td><td><input type="text" name="name" value="<?php echo($iProvider['Provider']['name']); ?>"  /></td>
				  <td style="width: 50px;">&nbsp;</td>
				  <td>Address: </td><td><input type="text" name="address" value="<?php echo($iProvider['Provider']['address']); ?>"  /></td>
                 </tr>
                 <tr>
                 	<td>Description: </td><td><textarea rows="4" cols="22" name="description"><?php echo($iProvider['Provider']['description']); ?></textarea></td>
					 <td style="width: 50px;">&nbsp;</td>
					<td>Phone: </td><td><input type="text" name="phone" value="<?php echo($iProvider['Provider']['phone']); ?>"  /></td>
                 </tr>
            	 <tr>
                    <td colspan="5" align="right">
                    <input type="submit" value="Lưu" style="height: 25px; padding-top: 0.3em;"/>
                    <input type="button" value="Hủy" style="height: 25px; padding-top: 0.3em;" onclick="onCancel();"/>
                    </td>
					
                    </tr>
                </table>
				 </td>
                </tr>
                <tr>
                    <td colspan="2" style="padding-bottom: 0;"><hr /></td>
                </tr>
                <tr>
                    <td colspan="2" style="padding-top: 0;">Trường <font color="red">*</font> yêu cầu phải nhập</td>
                </tr>
				
                </table>
            </form>
        </div>
<table class="border" style="width: 100%;">
    <tr>
        <td colspan="7" align=center><a href="/onlinemarket/providers">Thêm nhà sản xuất mới</a></td>
    </tr>
    <tr>
        <th>Tên Nhà Sản Xuất</th>
        <th>Địa Chỉ</th>
        <th>Điện Thoại</th>
		<th>Mô Tả</th>
        <th>Chức Năng</th>
    </tr>
<?php foreach ($provider as $pro) : ?>
<tr>
    <td align=center><?php echo($pro['Provider']['name']); ?></td>
    <td align=center><?php echo($pro['Provider']['address']); ?></td>
    <td align=center><?php echo($pro['Provider']['phone']); ?></td>
    <td align=center><?php echo($pro['Provider']['description']); ?></td>
    <td align=center>
        <img style="cursor: pointer;" src="/onlinemarket/img/system/bt_edit.png" onclick="onEdit('/onlinemarket/providers/index/<?php echo($pro['Provider']['id']);?>')" alt="Sửa" title="Sửa"/>
        <img style="cursor: pointer;" src="/onlinemarket/img/system/bt_delete.png" onclick="onEdit('/onlinemarket/providers/delete/?id=<?php echo($pro['Provider']['id']);?>')" alt="Xóa" title="Xóa"/>
    </td>
</tr>
<?php endforeach; ?>
</table>
<div style="text-align: right;">
    <?php echo $this->Paginator->numbers();?>
    <?php echo $this->Paginator->prev('« Previous', null, null, array('class' => 'disabled')); ?>
    <?php echo $this->Paginator->next('Next »', null, null, array('class' => 'disabled')); ?>
</div>
</div>
<script>
function onEdit(link) {
        window.location = link;
    }
    function onCancel() {
        $('form').slideUp('slow');
    }
    function getQueryVariable(variable) {
        var query = window.location.search.substring(1);
        var vars = query.split('&');
        for (var i=0; i<vars.length; i++) {
            var pair = vars[i].split('=');
            if (pair[0] == variable) {
                return pair[1];
            }
        }
    };

</script>
